import request from '@/utils/request'

// 查询药品列表
export function listMedication(query) {
  return request({
    url: '/system/medication/list',
    method: 'get',
    params: query
  })
}

// 查询药品详细
export function getMedication(id) {
  return request({
    url: '/system/medication/' + id,
    method: 'get'
  })
}

// 新增药品
export function addMedication(data) {
  return request({
    url: '/system/medication',
    method: 'post',
    data: data
  })
}

// 修改药品
export function updateMedication(data) {
  return request({
    url: '/system/medication',
    method: 'put',
    data: data
  })
}

// 删除药品
export function delMedication(id) {
  return request({
    url: '/system/medication/' + id,
    method: 'delete'
  })
}
